<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>医学证明管理系统</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
        }
        
        body {
            background: linear-gradient(135deg, #e0f0ff, #f5f9ff);
            color: #333;
            padding: 10px;
            min-height: 100vh;
        }
        
        .container {
            max-width: 1600px;
            margin: 0px auto;
            background: white;
            border-radius: 16px;
            box-shadow: 0 10px 35px rgba(0, 87, 158, 0.15);
            overflow: hidden;
        }
        
        /* 头部样式 */
        .header {
            background: linear-gradient(135deg, #1a6fc4, #0d47a1);
            color: white;
            padding: 30px 40px;
            text-align: center;
            position: relative;
        }
        
        .header h1 {
            font-size: 32px;
            font-weight: 500;
            letter-spacing: 1px;
            margin-bottom: 20px;
            text-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }
        
        .search-container {
            max-width: 700px;
            margin: 0 auto;
            position: relative;
        }
        
        .search-container input {
            width: 100%;
            padding: 16px 25px;
            padding-left: 60px;
            border: none;
            border-radius: 50px;
            font-size: 17px;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
            transition: all 0.3s ease;
        }
        
        .search-container input:focus {
            outline: none;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
        }
        
        .search-container i {
            position: absolute;
            left: 25px;
            top: 50%;
            transform: translateY(-50%);
            color: #1a6fc4;
            font-size: 22px;
        }
        
        /* 功能按钮区域 */
        .actions {
            display: flex;
            justify-content: space-between;
            padding: 25px;
            border-bottom: 1px solid #eaeaea;
            background: #f9fbfd;
        }
        
        .tabs {
            display: flex;
            gap: 8px;
        }
        
        .tab {
            padding: 12px 32px;
            background: #e3f2fd;
            color: #0d47a1;
            border-radius: 30px;
            cursor: pointer;
            font-weight: 500;
            transition: all 0.3s ease;
            font-size: 17px;
            box-shadow: 0 3px 8px rgba(0,0,0,0.05);
            border: 1px solid #bbdefb;
        }
        
        .tab.active {
            background: #0d47a1;
            color: white;
            box-shadow: 0 4px 12px rgba(13, 71, 161, 0.3);
        }
        
        .tab:hover:not(.active) {
            background: #bbdefb;
            transform: translateY(-2px);
        }
        
        .create-btn {
            background: linear-gradient(135deg, #28a745, #218838);
            color: white;
            border: none;
            padding: 12px 30px;
            border-radius: 30px;
            font-weight: 500;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;
            transition: all 0.3s ease;
            box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
            font-size: 17px;
        }
        
        .create-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(40, 167, 69, 0.4);
        }
        
        /* 表格区域 */
        .table-container {
           /* overflow-x: auto; */
            padding: 0 ;
        }
        
        .table-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 20px;
            align-items: center;
        }
        
        .table-title {
            font-size: 24px;
            color: #0d47a1;
            font-weight: 600;
        }
        
        .table-actions {
            display: flex;
            gap: 15px;
        }
        
        .table-action-btn {
            background: #e3f2fd;
            color: #0d47a1;
            border: 1px solid #bbdefb;
            padding: 8px 15px;
            border-radius: 6px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: all 0.2s ease;
        }
        
        .table-action-btn:hover {
            background: #bbdefb;
        }
        
        table {
            width: 100%;
            border-collapse: collapse;
            min-width: 1400px;
        }
        
        th {
            background: #e3f2fd;
            color: #0d47a1;
            padding: 15px 10px;
            text-align: left;
            font-weight: 600;
            border-bottom: 2px solid #bbdefb;
            font-size: 16px;
        }
        
        td {
            padding: 18px 15px;
            border-bottom: 1px solid #eaeaea;
            color: #444;
            font-size: 15px;
            vertical-align: top;
            line-height: 1.5;
        }
        
        tr {
            transition: background-color 0.25s ease, transform 0.2s ease;
        }
        
        tr:hover {
            background-color: #f0f7ff !important;
            cursor: pointer;
            transform: translateY(-1px);
            box-shadow: 0 4px 10px rgba(0,0,0,0.05);
        }
        
        /* 斑马纹效果 */
        tr:nth-child(even) {
            background-color: #f9fbfd;
        }
        
        .detail-btn {
            background: #e3f2fd;
            color: #0d47a1;
            border: none;
            padding: 8px 18px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.2s ease;
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }
        
        .detail-btn:hover {
            background: #bbdefb;
            transform: translateY(-2px);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }
        
        /* 长文本处理 */
        .ellipsis {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 250px;
            display: block;
        }
        
        .full-text {
            position: absolute;
            background: rgba(0,0,0,0.8);
            color: white;
            padding: 8px 12px;
            border-radius: 4px;
            z-index: 100;
            max-width: 400px;
            font-size: 14px;
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.2s;
        }
        
        .text-container {
            position: relative;
            display: inline-block;
        }
        
        .text-container:hover .full-text {
            opacity: 1;
        }
        
        /* 响应式设计 */
        @media (max-width: 992px) {
            .header {
                padding: 25px 20px;
            }
            
            .header h1 {
                font-size: 26px;
            }
            
            .actions {
                padding: 20px;
                flex-direction: column;
                gap: 15px;
            }
            
            .tabs {
                width: 100%;
                justify-content: center;
            }
            
            .create-btn {
                width: 100%;
                justify-content: center;
            }
            
            .table-container {
                padding: 20px;
            }
        }
        
        @media (max-width: 768px) {
            .header h1 {
                font-size: 24px;
            }
            
            .tab {
                padding: 10px 20px;
                font-size: 15px;
            }
            
            .table-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 15px;
            }
        }
        
        /* 页脚 */
        .footer {
            text-align: center;
            padding: 20px;
            color: #666;
            font-size: 14px;
            border-top: 1px solid #eaeaea;
            background: #f9fbfd;
        }
        
        /* 列宽调整手柄 */
        .resize-handle {
            position: absolute;
            top: 0;
            right: 0;
            width: 5px;
            height: 100%;
            background: #90caf9;
            cursor: col-resize;
            opacity: 0;
            transition: opacity 0.2s;
        }
        
        th:hover .resize-handle {
            opacity: 1;
        }
        
        /* 状态指示器 */
        .status-indicator {
            display: inline-block;
            width: 10px;
            height: 10px;
            border-radius: 50%;
            margin-right: 8px;
        }
        
        .status-active {
            background: #28a745;
        }
        
        .status-pending {
            background: #ffc107;
        }
        
        /* 优化表格列宽 */
        th:nth-child(1), td:nth-child(1) { width: 60px; text-align: center;} /* 序号 */
        th:nth-child(2), td:nth-child(2) { width: 100px; } /* 姓名 */
        th:nth-child(3), td:nth-child(3) { width: 200px; } /* 身份证号 */
        th:nth-child(4), td:nth-child(4) { width: 70px; text-align: center; } /* 性别 */
        th:nth-child(5), td:nth-child(5) { width: 70px; text-align: center;} /* 年龄 */
        th:nth-child(6), td:nth-child(6) { width: 250px; } /* 地址 */
        th:nth-child(7), td:nth-child(7) { width: 130px; } /* 电话 */
        th:nth-child(8), td:nth-child(8) { width: 150px; } /* 死亡时间 */
        th:nth-child(9), td:nth-child(9) { width: 120px; text-align: center; } /* 开立医生 */
        th:nth-child(10), td:nth-child(10) { width: 150px; } /* 开立时间 */
        th:nth-child(11), td:nth-child(11) { width: 180px; } /* 唯一编码 */
       th:nth-child(12), td:nth-child(12) { text-align: center;} /* 操作 */
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <h1>欢迎登录医学证明管理系统</h1>
            <div class="search-container">
                <i class="fas fa-search"></i>
                <input type="text" placeholder="输入身份证号/住院号快速精准查找">
            </div>
        </div>
        
        <div class="actions">
            <div class="tabs">
                <div class="tab active" data-tab="all">全部证明</div>
                <div class="tab" data-tab="mine">我开立的</div>
            </div>
            <button class="create-btn">
                <i class="fas fa-plus-circle"></i> 创建医学证明
            </button>
        </div>
        
        <div class="table-container">
            <!-- <div class="table-header">
                <div class="table-title">医学证明列表</div>
                <div class="table-actions">
                    <button class="table-action-btn">
                        <i class="fas fa-download"></i> 导出
                    </button>
                    <button class="table-action-btn">
                        <i class="fas fa-print"></i> 打印
                    </button>
                    <button class="table-action-btn">
                        <i class="fas fa-filter"></i> 筛选
                    </button>
                </div>
            </div>
            -->
            <table>
                <thead>
                    <tr>
                        <th>序号</th>
                        <th>姓名</th>
                        <th>身份证号</th>
                        <th>性别</th>
                        <th>年龄</th>
                        <th>现住地地址</th>
                        <th>家庭电话</th>
                        <th>死亡时间</th>
                        <th>开立医生</th>
                        <th>开立时间</th>
                        <th>唯一编码</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody id="tableContent">
                    <!-- 全部证明数据 -->
                    <tr>
                        <td>01</td>
                        <td>张小三</td>
                        <td>
                            <div class="text-container">
                                <span class="ellipsis">123456789111234568</span>
                                <span class="full-text">123456789111234568</span>
                            </div>
                        </td>
                        <td>女</td>
                        <td>89</td>
                        <td>
                            <div class="text-container">
                                <span class="ellipsis">湘阳市西工区东下路168号</span>
                                <span class="full-text">湘阳市西工区东下路168号</span>
                            </div>
                        </td>
                        <td>13838818888</td>
                        <td>2025-01-01 21:25</td>
                        <td>赵医生</td>
                        <td>2025-01-01 21:29</td>
                        <td>
                            <div class="text-container">
                                <span class="ellipsis">41003798620250001</span>
                                <span class="full-text">41003798620250001</span>
                            </div>
                        </td>
                        <td><button class="detail-btn">详情</button></td>
                    </tr>
                    <tr>
                        <td>02</td>
                        <td>刘小四</td>
                        <td>
                            <div class="text-container">
                                <span class="ellipsis">123456789111234568</span>
                                <span class="full-text">123456789111234568</span>
                            </div>
                        </td>
                        <td>女</td>
                        <td>89</td>
                        <td>
                            <div class="text-container">
                                <span class="ellipsis">湘阳市西工区东下路168号</span>
                                <span class="full-text">湘阳市西工区东下路168号</span>
                            </div>
                        </td>
                        <td>13838818888</td>
                        <td>2025-01-01 21:25</td>
                        <td>李医生</td>
                        <td>2025-01-01 21:29</td>
                        <td>
                            <div class="text-container">
                                <span class="ellipsis">41003798620250002</span>
                                <span class="full-text">41003798620250002</span>
                            </div>
                        </td>
                        <td><button class="detail-btn">详情</button></td>
                    </tr>
                    <tr>
                        <td>03</td>
                        <td>赵小五</td>
                        <td>
                            <div class="text-container">
                                <span class="ellipsis">123456789111234568</span>
                                <span class="full-text">123456789111234568</span>
                            </div>
                        </td>
                        <td>女</td>
                        <td>89</td>
                        <td>
                            <div class="text-container">
                                <span class="ellipsis">湘阳市西工区东下路168号</span>
                                <span class="full-text">湘阳市西工区东下路168号</span>
                            </div>
                        </td>
                        <td>13838818888</td>
                        <td>2025-01-01 21:25</td>
                        <td>黄医生</td>
                        <td>2025-01-01 21:29</td>
                        <td>
                            <div class="text-container">
                                <span class="ellipsis">41003798620250003</span>
                                <span class="full-text">41003798620250003</span>
                            </div>
                        </td>
                        <td><button class="detail-btn">详情</button></td>
                    </tr>
                    <tr>
                        <td>04</td>
                        <td>孙小六</td>
                        <td>
                            <div class="text-container">
                                <span class="ellipsis">123456789111234568</span>
                                <span class="full-text">123456789111234568</span>
                            </div>
                        </td>
                        <td>女</td>
                        <td>89</td>
                        <td>
                            <div class="text-container">
                                <span class="ellipsis">湘阳市西工区东下路168号</span>
                                <span class="full-text">湘阳市西工区东下路168号</span>
                            </div>
                        </td>
                        <td>13838818888</td>
                        <td>2025-01-01 21:25</td>
                        <td>刘医生</td>
                        <td>2025-01-01 21:29</td>
                        <td>
                            <div class="text-container">
                                <span class="ellipsis">41003798620250004</span>
                                <span class="full-text">41003798620250004</span>
                            </div>
                        </td>
                        <td><button class="detail-btn">详情</button></td>
                    </tr>
                    <tr>
                        <td>05</td>
                        <td>王小八</td>
                        <td>
                            <div class="text-container">
                                <span class="ellipsis">123456789111234568</span>
                                <span class="full-text">123456789111234568</span>
                            </div>
                        </td>
                        <td>女</td>
                        <td>89</td>
                        <td>
                            <div class="text-container">
                                <span class="ellipsis">湘阳市西工区东下路168号</span>
                                <span class="full-text">湘阳市西工区东下路168号</span>
                            </div>
                        </td>
                        <td>13838818888</td>
                        <td>2025-01-01 21:25</td>
                        <td>孙医生</td>
                        <td>2025-01-01 21:29</td>
                        <td>
                            <div class="text-container">
                                <span class="ellipsis">41003798620250005</span>
                                <span class="full-text">41003798620250005</span>
                            </div>
                        </td>
                        <td><button class="detail-btn">详情</button></td>
                    </tr>
                    <tr>
                        <td>06</td>
                        <td>钱小十</td>
                        <td>
                            <div class="text-container">
                                <span class="ellipsis">123456789111234568</span>
                                <span class="full-text">123456789111234568</span>
                            </div>
                        </td>
                        <td>女</td>
                        <td>89</td>
                        <td>
                            <div class="text-container">
                                <span class="ellipsis">湘阳市西工区东下路168号</span>
                                <span class="full-text">湘阳市西工区东下路168号</span>
                            </div>
                        </td>
                        <td>13838818888</td>
                        <td>2025-01-01 21:25</td>
                        <td>张医生</td>
                        <td>2025-01-01 21:29</td>
                        <td>
                            <div class="text-container">
                                <span class="ellipsis">41003798620250006</span>
                                <span class="full-text">41003798620250006</span>
                            </div>
                        </td>
                        <td><button class="detail-btn">详情</button></td>
                    </tr>
                </tbody>
            </table>
        </div>
        
        <div class="footer">
            <p>© 2025 医学证明管理系统 | 版本 2.1.0 | 数据更新时间: 2025-06-20 10:30</p>
        </div>
    </div>

    <script>
        // 页签切换功能
        const tabs = document.querySelectorAll('.tab');
        const tableContent = document.getElementById('tableContent');
        
        // "我开立的"证明数据
        const myCertificates = [
            {
                id: "02",
                name: "刘小四",
                idNumber: "123456789111234568",
                gender: "女",
                age: "89",
                address: "湘阳市西工区东下路168号",
                phone: "13838818888",
                deathTime: "2025-01-01 21:25",
                doctor: "李医生",
                issueTime: "2025-01-01 21:29",
                code: "41003798620250002"
            },
            {
                id: "06",
                name: "钱小十",
                idNumber: "123456789111234568",
                gender: "女",
                age: "89",
                address: "湘阳市西工区东下路168号",
                phone: "13838818888",
                deathTime: "2025-01-01 21:25",
                doctor: "张医生",
                issueTime: "2025-01-01 21:29",
                code: "41003798620250006"
            }
        ];
        
        // 切换页签
        tabs.forEach(tab => {
            tab.addEventListener('click', function() {
                // 移除所有active类
                tabs.forEach(t => t.classList.remove('active'));
                // 给当前点击的页签添加active类
                this.classList.add('active');
                
                // 根据data-tab属性切换内容
                const tabType = this.getAttribute('data-tab');
                
                if (tabType === 'mine') {
                    renderMyCertificates();
                } else {
                    renderAllCertificates();
                }
            });
        });
        
        // 渲染"我开立的"证明
        function renderMyCertificates() {
            let html = '';
            
            myCertificates.forEach((item, index) => {
                html += `
                    <tr>
                        <td>0${index + 1}</td>
                        <td>${item.name}</td>
                        <td>
                            <div class="text-container">
                                <span class="ellipsis">${item.idNumber}</span>
                                <span class="full-text">${item.idNumber}</span>
                            </div>
                        </td>
                        <td>${item.gender}</td>
                        <td>${item.age}</td>
                        <td>
                            <div class="text-container">
                                <span class="ellipsis">${item.address}</span>
                                <span class="full-text">${item.address}</span>
                            </div>
                        </td>
                        <td>${item.phone}</td>
                        <td>${item.deathTime}</td>
                        <td>${item.doctor}</td>
                        <td>${item.issueTime}</td>
                        <td>
                            <div class="text-container">
                                <span class="ellipsis">${item.code}</span>
                                <span class="full-text">${item.code}</span>
                            </div>
                        </td>
                        <td><button class="detail-btn">详情</button></td>
                    </tr>
                `;
            });
            
            tableContent.innerHTML = html;
        }
        
        // 渲染"全部证明"数据
        function renderAllCertificates() {
            // 实际项目中这里应该从服务器获取数据
            // 这里直接使用HTML中已有的数据
            tableContent.innerHTML = `
                <tr>
                    <td>01</td>
                    <td>张小三</td>
                    <td>
                        <div class="text-container">
                            <span class="ellipsis">123456789111234568</span>
                            <span class="full-text">123456789111234568</span>
                        </div>
                    </td>
                    <td>女</td>
                    <td>89</td>
                    <td>
                        <div class="text-container">
                            <span class="ellipsis">湘阳市西工区东下路168号</span>
                            <span class="full-text">湘阳市西工区东下路168号</span>
                        </div>
                    </td>
                    <td>13838818888</td>
                    <td>2025-01-01 21:25</td>
                    <td>赵医生</td>
                    <td>2025-01-01 21:29</td>
                    <td>
                        <div class="text-container">
                            <span class="ellipsis">41003798620250001</span>
                            <span class="full-text">41003798620250001</span>
                        </div>
                    </td>
                    <td><button class="detail-btn">详情</button></td>
                </tr>
                <tr>
                    <td>02</td>
                    <td>刘小四</td>
                    <td>
                        <div class="text-container">
                            <span class="ellipsis">123456789111234568</span>
                            <span class="full-text">123456789111234568</span>
                        </div>
                    </td>
                    <td>女</td>
                    <td>89</td>
                    <td>
                        <div class="text-container">
                            <span class="ellipsis">湘阳市西工区东下路168号</span>
                            <span class="full-text">湘阳市西工区东下路168号</span>
                        </div>
                    </td>
                    <td>13838818888</td>
                    <td>2025-01-01 21:25</td>
                    <td>李医生</td>
                    <td>2025-01-01 21:29</td>
                    <td>
                        <div class="text-container">
                            <span class="ellipsis">41003798620250002</span>
                            <span class="full-text">41003798620250002</span>
                        </div>
                    </td>
                    <td><button class="detail-btn">详情</button></td>
                </tr>
                <tr>
                    <td>03</td>
                    <td>赵小五</td>
                    <td>
                        <div class="text-container">
                            <span class="ellipsis">123456789111234568</span>
                            <span class="full-text">123456789111234568</span>
                        </div>
                    </td>
                    <td>女</td>
                    <td>89</td>
                    <td>
                        <div class="text-container">
                            <span class="ellipsis">湘阳市西工区东下路168号</span>
                            <span class="full-text">湘阳市西工区东下路168号</span>
                        </div>
                    </td>
                    <td>13838818888</td>
                    <td>2025-01-01 21:25</td>
                    <td>黄医生</td>
                    <td>2025-01-01 21:29</td>
                    <td>
                        <div class="text-container">
                            <span class="ellipsis">41003798620250003</span>
                            <span class="full-text">41003798620250003</span>
                        </div>
                    </td>
                    <td><button class="detail-btn">详情</button></td>
                </tr>
                <tr>
                    <td>04</td>
                    <td>孙小六</td>
                    <td>
                        <div class="text-container">
                            <span class="ellipsis">123456789111234568</span>
                            <span class="full-text">123456789111234568</span>
                        </div>
                    </td>
                    <td>女</td>
                    <td>89</td>
                    <td>
                        <div class="text-container">
                            <span class="ellipsis">湘阳市西工区东下路168号</span>
                            <span class="full-text">湘阳市西工区东下路168号</span>
                        </div>
                    </td>
                    <td>13838818888</td>
                    <td>2025-01-01 21:25</td>
                    <td>刘医生</td>
                    <td>2025-01-01 21:29</td>
                    <td>
                        <div class="text-container">
                            <span class="ellipsis">41003798620250004</span>
                            <span class="full-text">41003798620250004</span>
                        </div>
                    </td>
                    <td><button class="detail-btn">详情</button></td>
                </tr>
                <tr>
                    <td>05</td>
                    <td>王小八</td>
                    <td>
                        <div class="text-container">
                            <span class="ellipsis">123456789111234568</span>
                            <span class="full-text">123456789111234568</span>
                        </div>
                    </td>
                    <td>女</td>
                    <td>89</td>
                    <td>
                        <div class="text-container">
                            <span class="ellipsis">湘阳市西工区东下路168号</span>
                            <span class="full-text">湘阳市西工区东下路168号</span>
                        </div>
                    </td>
                    <td>13838818888</td>
                    <td>2025-01-01 21:25</td>
                    <td>孙医生</td>
                    <td>2025-01-01 21:29</td>
                    <td>
                        <div class="text-container">
                            <span class="ellipsis">41003798620250005</span>
                            <span class="full-text">41003798620250005</span>
                        </div>
                    </td>
                    <td><button class="detail-btn">详情</button></td>
                </tr>
                <tr>
                    <td>06</td>
                    <td>钱小十</td>
                    <td>
                        <div class="text-container">
                            <span class="ellipsis">123456789111234568</span>
                            <span class="full-text">123456789111234568</span>
                        </div>
                    </td>
                    <td>女</td>
                    <td>89</td>
                    <td>
                        <div class="text-container">
                            <span class="ellipsis">湘阳市西工区东下路168号</span>
                            <span class="full-text">湘阳市西工区东下路168号</span>
                        </div>
                    </td>
                    <td>13838818888</td>
                    <td>2025-01-01 21:25</td>
                    <td>张医生</td>
                    <td>2025-01-01 21:29</td>
                    <td>
                        <div class="text-container">
                            <span class="ellipsis">41003798620250006</span>
                            <span class="full-text">41003798620250006</span>
                        </div>
                    </td>
                    <td><button class="detail-btn">详情</button></td>
                </tr>
            `;
        }
    </script>
</body>
</html>